/*
 * vector.h
 *
 *  Created on: May 7, 2010
 *      Author: cralix
 */

#ifndef VECTOR_H_
#define VECTOR_H_

#include "common.h"
#define DEFAULT_VECTOR_SIZE 10

typedef struct {
	void ** data;
	unsigned int count;
	unsigned int max;
} vector_t;

typedef vector_t * vector_p;

vector_p vector_new(void);
int vector_len(vector_p v);
int vector_capacity(vector_p v);
return_t vector_resize(vector_p v, int size);
return_t vector_add(vector_p v, void * value);
return_t vector_insert(vector_p v, void * value, int index);
void * vector_get(vector_p v, int index);
void * vector_set(vector_p v, void * value, int index);
void * vector_remove(vector_p v, int index);
return_t vector_clear(vector_p v);
void vector_delete(vector_p v);



#endif /* VECTOR_H_ */
